package com.jy.api.dao;

import com.jy.api.domain.PaymentStatus;
import com.jy.api.payRes.Order201912;
import com.jy.api.payRes.OrderItem201912;
import com.jy.api.payRes.Payment201912;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface OrderItem201912Dao extends CrudRepository<OrderItem201912, String> {



    @Query(value = "SELECT *    FROM order_item_201912   where  order_id =?",nativeQuery = true)
    List<OrderItem201912>  findByOrderId(String orderId);



    @Query(value = "SELECT DISTINCT( order_id)    FROM order_item_201912   ORDER BY add_time ASC  LIMIT ? , ?",nativeQuery = true)
    List<String> findAllByStatus(int page,int limit);

}
